﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JiveMessenger.Models
{
    public class AddUserEmoticonModel : JiveCustomEmoticonModel
    {

        private bool _isValidShortcut;
        public bool IsValidShortcut
        {
            get { return _isValidShortcut; }
            set
            {
                if (_isValidShortcut != value)
                {
                    _isValidShortcut = value;
                    RaisePropertyChanged("IsValidShortcut");
                    RaisePropertyChanged("CanAddEmoticon");
                }
            }
        }
        private bool _emoticonFileExists;
        public bool EmoticonFileExists
        {
            get { return _emoticonFileExists; }
            set
            {
                if (_emoticonFileExists != value)
                {
                    _emoticonFileExists = value;
                    RaisePropertyChanged("EmoticonFileExists");
                    RaisePropertyChanged("CanAddEmoticon");
                }
            }
        }

        public bool CanAddEmoticon
        {
            get
            {
                return !EmoticonFileExists && IsValidShortcut;
            }
        }
        private bool _isChecked;
        public bool IsChecked
        {
            get { return _isChecked; }
            set
            {
                if (_isChecked != value)
                {
                    _isChecked = value;
                    RaisePropertyChanged("IsChecked");
                }
            }
        }
        private string _errorText;
        public string ErrorText
        {
            get { return _errorText; }
            set
            {
                if (_errorText != value)
                {
                    _errorText = value;
                    RaisePropertyChanged("ErrorText");
                }
            }
        }

        private string _username;
        public string Username
        {
            get { return _username; }
            set
            {
                if (_username != value)
                {
                    _username = value;
                    RaisePropertyChanged("Username");
                }
            }
        }



        public AddUserEmoticonModel()
        {
            IsChecked = false;
        }


    }
}
